package byte1;

import java.io.*;

public class FileInputStream3 {
    public static void main(String[] args) throws Exception {

        InputStream is = new FileInputStream("C:\\Users\\zjd\\IdeaProjects\\java\\src\\itheima.03.txt");


//     准备一个字节数组，与文件大小相等
        File f = new File("C:\\Users\\zjd\\IdeaProjects\\java\\src\\itheima.03.txt");
        long size = f.length();
        byte[] buffter = new byte[(int)size];

        int len = is.read(buffter);
        System.out.println(new String(buffter));

        System.out.println(len);
        System.out.println(size);

//        byte[] buffter = is.readAllBytes();
//        System.out.println(new String(buffter));
}
}
